|
|
|
|
|
|
|
Using the Frame Controls to Group Related Information |
|
|
|
|
|
|
|
|
When placing controls on a form, you should group related items together by enclosing them within a frame control. This frame control is sometimes called a group box because it boxes in a group of related controls. The frame caption is optional, but it is recommended. Using the frame control to group related items helps the user to quickly understand the relationship between fields on the form. |
|
|
|
|
|
|
|
|
Alignment of Controls on the Form |
|
|
|
|
|
|
|
|
All controls should be left-justified on the form. Show a clean line from top to bottom. This makes it easy to read down a list of fields quickly. Try to avoid multicolumn labels. If you must have more than one column of labels and input controls, be sure to left-align the second column, too. |
|
|
|
|
|
|
|
|
Standard Sizing and Spacing for Controls |
|
|
|
|
|
|
|
|
All controls should have standard height, spacing, and width where appropriate. Microsoft publishes its Win95 spacing standards in pixels or DLU (dialog units). Because Visual Basic controls work in twips instead of pixels, you need to know that one pixel equals 15 twips. Table 4.2 shows the recommended spacing and sizing for various controls on a form. Use these as a guide when creating your forms. |
|
|
|
|
| Table 4.2. Control spacing and sizing. | | Form Control | Size/Spacing | | Control height | 300 twips | | Command button width | 1200 twips | | Vertical spacing between controls | 60 twips for related items
90 twips for unrelated items | | Border widths (top, bottom, and side) | 120 twips |
|
|
|
|
|
|
Notice that the height of all controls is the same. This makes it easy to align controls on a form regardless of their type (command buttons, textboxes, checkboxes, and so on). The recommended spacing between controls seems quite wide when you first begin designing forms with these standards. However, you'll find that once you get the hang of these numbers, you'll be able to put together very clean-looking forms in a short amount of time. |
|
|
|
|
|